function a = a_n1m1_n2m2(n1, m1, n2, m2, y_cur, lambda, r_u, r_w, d, theta_u, theta_w)
   % 计算常数部分 c(y)
   c = @(y, n1, m) - (2*pi/lambda) * (sqrt((r_u(2) - y(n1) ).^2 + r_u(1)^2) - sqrt((r_w(2) - y(n1)).^2 + r_w(1)^2)) + ...
             (2*pi/lambda) * (m * d * (sin(theta_u(n1)) - sin(theta_w(n1))));   
   % 目标函数计算
   cos_func = @(y, n1, m1, n2, m2) cos(c(y, n1, m1) - c(y, n2, m2));  % 非凸目标函数
   sin_func = @(y, n1, m1, n2, m2) sin(c(y, n1, m1) - c(y, n2, m2));  % 非凸目标函数

   delta_2f =  - ( ...
            4 * pi^2 / lambda^2 *  cos_func(y_cur, n1, m1, n2, m2) ...
               * ( (y_cur(n1) - r_u(2))/norm(r_u - [0,y_cur(n1)].') - (y_cur(n1) - r_w(2))/norm(r_w - [0,y_cur(n1)].')...
               )^2 ...
             + 2 * pi / lambda * sin_func(y_cur, n1, m1, n2, m2) * ...
             (- (r_u(1)^2)/norm(r_u - [0,y_cur(n1)].')^3 + (r_w(1)^2)/norm(r_w - [0,y_cur(n1)].')^3) ...
               );
   a =  delta_2f / 2;
end
